package com.ita.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ita.dao.IBookDao;
import com.ita.service.IBookService;
import com.ita.vo.Book;
@Service(value="bookServiceImpl")
public class BookServiceImpl implements IBookService {

	private IBookDao dao;
	
	
	public IBookDao getDao() {
		return dao;
	}

	@Resource
	public void setDao(IBookDao dao) {
		this.dao = dao;
	}

	@Transactional
	public int insert(Book book) {
		// TODO Auto-generated method stub
		return dao.insert(book);
	}

	@Transactional
	public int update(Book book) {
		// TODO Auto-generated method stub
		return dao.update(book);
	}

	public List<Book> fuzzyQueryById(String bookid) {
		// TODO Auto-generated method stub
		return dao.fuzzyQueryById(bookid);
	}

	public List<Book> queryAll() {
		// TODO Auto-generated method stub
		return dao.queryAll();
	}

	@Transactional
	public int deleteById(String bookid) {
		// TODO Auto-generated method stub
		return dao.deleteById(bookid);
	}
}
